﻿@namespace BlazorComponent
@inherits BDomComponentBase

@if (_tag == IconTag.I)
{
    if (Click.HasDelegate)
    {
        <button type="button"
                class="@CssProvider.GetClass(this)"
                style="@CssProvider.GetStyle(this)"
                id="@Id"
                @ref="Ref"
                @onclick="HandleOnClick">
            @_icon
        </button>
    }
    else
    {
        <i class="@CssProvider.GetClass(this)"
           style="@CssProvider.GetStyle(this)"
           id="@Id"
           @ref="Ref"
           @onclick="HandleOnClick">
            @_icon
        </i>
    }
}
else
{
    // Render SVG

    <span role="img"
          class="@CssProvider.GetClass(this)"
          style="@CssProvider.GetStyle(this)"
          id="@Id"
          @ref="Ref"
          @onclick="HandleOnClick">
        @((MarkupString) _icon)
    </span>
}
